package com.evildog.workspace.log.application.model;

import com.evildog.workspace.dependencies.mybatis.annotation.QueryCondition;
import com.evildog.workspace.dependencies.mybatis.enums.ComparisonOperatorsEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * exceptionLog分页查询参数，可以使用QueryCondition.class
 * </p>
 *
 * @author evildog
 * @since 2020-08-29
 */
@Data
@Accessors(chain = true)
@ApiModel(value="ExceptionLog查询参数")
public class ExceptionLogPageParam implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "应用名")
    @QueryCondition
    private String applicationName;

    @ApiModelProperty(value = "请求地址")
    @QueryCondition(operator = ComparisonOperatorsEnum.LEFT_LIKE)
    private String uri;

    @ApiModelProperty(value = "ip")
    @QueryCondition(operator = ComparisonOperatorsEnum.LEFT_LIKE)
    private String ip;

    @ApiModelProperty(value = "异常开始时间")
    @QueryCondition(fieldName = "exception_time",operator = ComparisonOperatorsEnum.GE)
    private LocalDateTime startExceptionTime;

    @ApiModelProperty(value = "异常结束时间")
    @QueryCondition(fieldName = "exception_time",operator = ComparisonOperatorsEnum.LE)
    private LocalDateTime endExceptionTime;

}
